import React from 'react';
import { formatMessage, setLocale, getLocale } from 'umi-plugin-locale';
import {ButtonComp, SelectLang, GlobalProvider} from 'jh-lib';
const localeUtils = {
    formatMsgByCn:(val)=>{
        const selectedLang = getLocale();
        // console.log(selectedLang)
        if (selectedLang ==='zh-CN'){
            return '语言'
        }else if (selectedLang ==='en-US'){
            return 'Language'
        }

    },
    changeLocale:(key)=>{
        setLocale(key)
    }
};
export default class Test extends React.Component{
    state={
        visible:false
    }
    render(){
        return (
            <>
                <GlobalProvider localeUtils={localeUtils}>
                    <SelectLang/>
                </GlobalProvider>

            </>)
    }
}
